package Text11;

import java.util.*;

public class Main {
    static int N = 1000010;
    public static boolean[] st = new boolean[N];

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        find(n);
    }

    private static void find(int n) {
        int cnt = 0;
        for (int i = 2; i <= n; i++) {
            if (!st[i]) {
                cnt++;
                for (int j = 2 * i; j <= n; j += i) {
                    st[j] = true;
                }
            }
        }
        System.out.println(cnt);
    }
}
